Generally, a controller which drives a driven electric body such as a motor includes a configuration which protects a substrate which is disposed inside the controller, an electronic component such as a noise suppression device mounted on the substrate, a semiconductor device, and the like. For example, in a controller (a circuit board unit) disclosed in Patent Document 1, a substrate is sealed using an upper case and a lower case. However, in such a configuration, a waterproof seal structure for securing waterproof property is necessary at a joint portion between the upper case and the lower case. Also, in the case of the controller configuration disclosed in Patent Document 1, since a space is formed therein, a fixing structure for an electronic component or a stress relaxation structure for a terminal of an electronic component are necessary as a vibration countermeasure for the electronic component disposed therein. Further, if there is a space inside, a ventilation mechanism for adjusting a pressure difference between the inside and outside of the controller is also required, and thus there is a problem in that the number of parts is increased.
In response to the above problem, in a controller (a device for driving a motor) disclosed in Patent Document 2, internal airtightness is enhanced by molding the entire integrated circuit which is a power device including an electronic component and a semiconductor device using a resin, for example.